package de.tum.se.sudoku.impl;

import java.util.ArrayList;
import java.util.List;

import de.tum.se.sudoku.logic.ISolver;
import de.tum.se.sudoku.logic.SolverBackTrack;
import de.tum.se.sudoku.logic.SolverBruteForce;
import de.tum.se.sudoku.logic.SolverRandom;

//TODO: Please add your solving strategy here
public class SolverStrategys {
	public static final String RANDOM_DISPLAY_NAME = "Random";
	public static final String BRUTEFORCE_DISPLAY_NAME = "Brute Force";
	public static final String BACKTRACK_DISPLAY_NAME = "Back Track";

	public static List<String> retAllSolverNames() {
		List<String> solverNames = new ArrayList<String>();
		solverNames.add(RANDOM_DISPLAY_NAME);
		solverNames.add(BRUTEFORCE_DISPLAY_NAME);
		solverNames.add(BACKTRACK_DISPLAY_NAME);
		return solverNames;
	}

	public static ISolver retSolver(String displayName) {
		switch (displayName) {
		case RANDOM_DISPLAY_NAME:
			return new SolverRandom();
		case BRUTEFORCE_DISPLAY_NAME:
			return new SolverBruteForce();
		case BACKTRACK_DISPLAY_NAME:
			return new SolverBackTrack();
		default:
			return new SolverRandom();
		}
	}
}
